<?php get_header(); ?>
    <?php include ('menu.php') ?>
    <div class="main-content">
        <div class="home">
            <?php  if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                
            <?PHP endwhile; else: ?>
                <p>Sorry, no posts matched your criteria.</p>
            <?php endif; ?>   
            <div>
                <img src="<?php echo postImage(get_the_ID()); ?>" />
                <H2>Descripcion</h2>
                <?php echo the_content(); ?>    
            </div>            
            <h2>PRODUCTOS RECOMENDADOS</h2>
            <div class="suggests">
                <ul>
                <?php $args = array(
                    'numberposts'     => 5,
                    'offset'          => 0,
                    'category'        => get_category_by_slug("recomendados")->cat_ID,
                    'orderby'         => 'post_date',
                    'order'           => 'DESC',
                    'post_type'       => 'post',
                    'post_status'     => 'publish' );
                $posts_array = get_posts( $args ); 
                foreach($posts_array as $post){
                    $imagen=postImage($post->ID);
                    $titulo=$post->post_title;
                    $precio=get_catalog_price($post->ID);
                    $link=$post->post_name;
                    
                    include ('item-unit.php');
                }
                ?>             
            </ul>
            <div class="clearfix"></div>            
        </div>
    </div>
   <? include('sidebar-right.php') ?>
</div>
<?php get_footer(); ?>